package com.cet.spring_batch_study.jobs.dbReader;

import com.cet.spring_batch_study.jobs.dbReader.domain.CustomerCredit;
import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.item.Chunk;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Component;

/**
 * @author NSOC
 */
@Slf4j
@Component
public class CustomerCreditItemWriter implements ItemWriter<CustomerCredit> {
    @Override
    public void write(Chunk<? extends CustomerCredit> chunk) throws Exception {
        chunk.getItems().forEach(System.out::println);
    }
}
